<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        
    </div>

    <script>
        var login = {
            template: '<h1>这是登录组件</h1>'
        }

        var vm = new Vue({
            el: '#app',
            data: {},
            methods: {},
            render:function(createElements){ // createElements是一个方法，调用它，能够把指定的组件模板，渲染为html结构
                var html = createElements(login)
                return html
                // 注意：这里return的结果，会替换页面中el指定的那个容器
            }
        });
    </script>
</body>

</html>
